package com.jdls.tanhua.web;

import com.jdls.tanhua.server.TestSoulServer;
import com.jdls.tanhua.vo.QuestionVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 嘉德罗斯
 * @date 2021/11/8
 */
@RestController
@RequestMapping("/testSoul")
public class TestSoulWeb {

    @Autowired
    private TestSoulServer testSoulServer;


    @GetMapping
    //查看题库
    public ResponseEntity find() {

        List<QuestionVo> questionVos = testSoulServer.find();

        return ResponseEntity.ok(questionVos);
    }
}
